﻿<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Dotamax - 做国内第一游戏数据门户</title>
    <script src="__PUBLIC__/home_public/js/jquery-1.8.3.min.js" type="text/javascript"></script>
    <!-- <script src="__PUBLIC__/js/jsbn.js" type="text/javascript" charset="utf-8"></script> -->
    <script src="__PUBLIC__/home_public/js/prng4.js" type="text/javascript" charset="utf-8"></script>
    <script src="__PUBLIC__/home_public/js/rng.js" type="text/javascript" charset="utf-8"></script>
    <script src="__PUBLIC__/home_public/js/rsa.js" type="text/javascript" charset="utf-8"></script>
    <script src="__PUBLIC__/home_public/js/base64.js" type="text/javascript" charset="utf-8"></script>
</head>
<link rel="stylesheet" href="__PUBLIC__/home_public/css/font-awesome.min.css">
<link rel="stylesheet" href="__PUBLIC__/home_public/login.css">

<!-- 表单验证插件 -->
<script src="__PUBLIC__/home_public/js/Validform_v5.3.2_min.js" type="text/javascript" charset="utf-8"></script>

<body id="particles-js">

    <div style=""></div>

    <script src="__PUBLIC__/home_public/js/particles.min.js"></script>
    <script src="__PUBLIC__/home_public/js/partical.js"></script>
    <script type="text/javascript">
        var num = parseInt(Math.random() * 5 + 1);
        document.body.style.backgroundImage = "url(http://cdn.maxjia.com/image/p_0" + num + ".jpg)";
    </script>

    <div id="nav-bar">
        <div class="nav-head">
            <a href="/home/">
                <div style="margin-top: 12px;margin-left: 30px;float: left;">
                    <img src="__PUBLIC__/home_public/picture/max_logo3.png" style="height: 25px;">
                </div>
            </a>
            <!--li class="sign-up-btn-small" style="float: right;margin-right: 30px;">注册</li>
            <li class="sign-in-btn-small" style="float: right;">登陆</li-->
        </div>
    </div>
    <div style="z-index: 1000;position: absolute;top:20%;left :50%;margin: 0 0 0 -190px;">
        <div style="margin-left: auto;margin-right: auto;width: 300px;text-align: center;background-color: rgba(50,50,50,0.6);padding: 20px 40px 60px 40px;position: relative;">
            <div style="margin-top: 5px;margin-bottom: 20px;color:#ccc;font-size: 14px;font-weight: 600;">
                输入注册信息
            </div>
            <div style="margin-left: 0px;margin-bottom: 10px;">
                <font class="login-reply">
        </font>
            </div>
            <div style="display: block;height: 340px;margin-bottom: 10px;">
                    <form onsubmit="return false"  >
                    <div style="float: left;">
                        <div style="width: 290px;float: left;line-height: 37px;text-align: left;padding-left: 5px;">Email(用户名):</div>
                        <input id="email" class="login-input all-radius" type="text" datatype="s5-16" name="email" errormsg="请输入至少五个字,最多十六个字" placeholder="请输入正确的邮箱" value="">
                        <div id="tip1" class=" all-radius" type="text" name="email" value=""></div>
                    </div>
                    <div style="float: left;">
                        <div style="width: 290px;float: left;line-height: 37px;text-align: left;padding-left: 5px;">密码:</div>
                        <input id="pwd" class="login-input all-radius" type="password" name="password" placeholder="不少于6个字符">
                        <div id="tip2" class=" all-radius"></div>
                    </div>
                    <div style="float: left;">
                        <div style="width: 290px;float: left;line-height: 37px;text-align: left;padding-left: 5px;">确认密码:</div>
                        <input id="repwd" class="login-input all-radius" type="password" name="password2" placeholder="">
                        <div id="tip3" class=" all-radius"></div>
                    </div>
                    <div style="float: left;">
                        <div style="width: 290px;float: left;line-height: 37px;text-align: left;padding-left: 5px;">邮箱验证码:<button id='mailyzm'>获取验证码</button></div>
                        <input id="yzm" class="login-input all-radius" type="text" name="yzm" value="" placeholder="请输入收到的验证码">

                        <div id="tip3" class=" all-radius"></div>
                    </div>

                    <div style="float: left">
                        <div style="width: 290px;float: left;line-height: 37px;text-align: left;padding-left: 5px;"></div>
                    </div>
                    <button id="login-btn" class="login-in-btn" style="margin-top: 20px;float: left;">
                        注册
                    </button>
                    </form>
            </div>
            <script>
    $(function(){
        $('#login-btn').click(function(){

            var email = $('#email').val();
            var pwd = $('#pwd').val();
            var repwd = $('#repwd').val();
            var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;
            var yzm = $('#yzm').val();

            if(!reg.test(email)){
                alert('请输入正确的邮箱');
                return false;
            }
            if(pwd.length<6)
            {
                alert('密码长度最小6位');
                return false;
            }
            if(pwd != repwd){
                alert('两次密码输入不一致');
                return false;
            }
            $.ajax({
            url:"<{:U(checkEmail)}>",
            type:"POST",
            data:{'email':email,'password':pwd,'yzm':yzm,'ui_id':""},
            dataType:'json', 
            success: function(data){
                    if (data == 'success') {
                        alert('注册成功');
                        window.location.href="http://localhost/dota_fishpool/Home/Login/index.html";
                    }
                    if(data == 'fail'){
                        alert('注册失败');
                    }
                    if(data == 'empty'){
                        alert('账号密码不能为空');
                    }
                    if(data == wrongyzm){
                        alert('验证码有误');
                    }
                }
            })
        })
        //点击发送邮箱验证码按钮
        $('#mailyzm').click(function(){
            var email = $('#email').val();
            $.ajax({
            url:"<{:U('Reg/emailyzm')}>",
            type:"POST",
            data:{'email':email},
            dataType:'json', 
            success: function(data){
                     if(data == 'exist'){
                        alert('账号已经存在');
                        return false;
                    }
                    if(data=='send'){
                        alert('验证码已经发送,请查收');
                    }
                    // if(data == 'exist'){
                    //     alert('账号已经存在');
                    // }
                }
            })
        })
    })
</script>
            <div style="position: absolute;right:40px;bottom: 20px;">
                <a href="javascript:history.go(-1)" style="color: rgb(152, 152, 152)">返回</a>
            </div>

        </div>
<!--         <div style="position: fixed;bottom:20px;width: 100%;">
            <div class="footbar" style="padding-bottom:10px;text-align: center;">

                <img src="__PUBLIC__/home_public/picture/logo_01.png" style="width:40px;margin: 0 auto;" class="max_logo breath">
                <div style="position: absolute;left:0px;bottom:10px;">

                    <div style="float:left;margin-left: 20px"><a target="_blank" href="mailto:ning@dotamax.com"><i title="商务合作" class="fa fa-envelope-o" style="font-size: 16px;padding-top: 1px;"></i></a>
                    </div>

                    <div style="float:left;margin-left: 20px"><a target="_blank" href="/app/"><i title="iOS App" class="fa fa-apple" style="font-size: 18px"></i></a>
                    </div>
                    <div style="float:left;margin-left: 20px"><a target="_blank" href="/app/"><i title="Android App" class="fa fa-android" style="font-size: 18px"></i></a>
                    </div>
                    <div style="float:left;margin-left: 20px"><a target="_blank" href="http://shang.qq.com/wpa/qunwpa?idkey=ef26fe7efd134659b38b044ae44ae8342c20f1654d9c372fd094f96bd004819e"><i title="反馈群:74188215" class="fa fa-qq" style="font-size: 16px;padding-top: 2px;"></i></a>
                    </div>

                </div>
                <div style="position: absolute;right:0px;bottom:10px;">
                    <div style="float:right;margin-right: 20px"><a target="_blank" href="/status/"><i title="状态" class="fa fa-heartbeat" style="font-size: 18px"></i></a>
                    </div>
                    <div style="float:right;margin-right: 20px"><a target="_blank" href="/summary/"><i title="统计" class="fa fa-bar-chart" style="font-size: 18px"></i></a>
                    </div>

                    <div style="float:right;margin-right: 20px"><a target="_blank" href="http://weibo.com/5606942020/profile?topnav=1&wvr=6"><i title="新浪微博" class="fa fa-weibo" style="font-size: 18px"></i></a>
                    </div>
                    <div style="float:right;margin-right: 20px"><a target="_blank" href="http://t.qq.com/dotamax?preview "><i title="腾讯微博" class="fa fa-tencent-weibo" style="font-size: 18px"></i></a>
                    </div>

                </div>
            </div>
        </div> -->
    </div>


</body>

</html>
